package reduce.fz.com.reduce.custom.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import reduce.fz.com.reduce.R;

/**
 * Created by qingshengzheng on 15/10/18.
 */
public class ShareStoryBottmBtn extends LinearLayout {
    //
    private ImageView mIvLeftImage;
    private TextView mTvDesc;
    private LayoutInflater layoutInflater;

    public ShareStoryBottmBtn(Context context, AttributeSet attrs) {
        super(context, attrs);
       layoutInflater=LayoutInflater.from(context);
        View  view =layoutInflater.inflate(R.layout.share_story_bottom_btn,this);
        view.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT,1.0f));
        initWidget(view);
    }
    public void initWidget(View view)
    {
        mIvLeftImage= (ImageView) view.findViewById(R.id.iv_left);
        mTvDesc=(TextView) view.findViewById(R.id.tv_desc);
    }
    public void setLeftAndTitle(int resId,String title)
    {
        mIvLeftImage.setImageResource(resId);
        mTvDesc.setText(title);
    }

}
